package c.f.b.a.a.a.b;

import android.content.Context;
import android.content.res.Configuration;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;
import com.huawei.hms.game.f0;
import com.huawei.hms.game.h;
import com.huawei.hms.game.i;

public class a extends FrameLayout {
    public int a;

    public a(Context context) {
        super(context);
        h.a("BuoyAutoHideNoticeView", "start create BuoyAutoHideNoticeView");
        LayoutInflater.from(context).inflate(f0.d("c_buoycircle_hide_notice"), this);
        this.a = context.getResources().getConfiguration().orientation;
    }

    public View getNoticeView() {
        return findViewById(f0.c("game_id_buoy_hide_notice_bg"));
    }

    public void onConfigurationChanged(Configuration configuration) {
        super.onConfigurationChanged(configuration);
        int i = this.a;
        int i2 = configuration.orientation;
        if (i != i2) {
            this.a = i2;
            i.c().a(this);
        }
    }

    public void setShowBackground(boolean z) {
        View findViewById;
        String str = "game_id_buoy_hide_notice_bg";
        if (z) {
            findViewById = findViewById(f0.c(str));
            str = "c_buoycircle_hide_shape_red";
        } else {
            findViewById = findViewById(f0.c(str));
            str = "c_buoycircle_hide_shape";
        }
        findViewById.setBackground(f0.a(str));
    }
}
